import typescript from '@rollup/plugin-typescript'

export default [{
  input: 'src/index.ts',
  output: [
    {
      file: 'dist/index.js',
      format: 'cjs',
      exports: 'named',
      sourcemap: true
    },
    {
      dir: 'dist/esm',
      format: 'esm',
      preserveModules: true,
      sourcemap: true
    }
  ],
  plugins: [
    typescript({
      declaration: true,
      declarationDir: 'dist/esm/types',
      exclude: ['**/*.test.ts']
    })
  ]
}]
